package nc.tb.schema;

import nc.tb.report.CellWrap;
import nc.tb.schema.vo.ConsolidationTemplate;
import nc.tb.schema.vo.Cube;
import nc.tb.schema.vo.Dimension;
import nc.tb.schema.vo.TCalendar;
import nc.tb.schema.vo.TCellsModel;
import nc.tb.schema.vo.TCtrlformulaVO;
import nc.tb.schema.vo.TCtrlschemeVO;
import nc.tb.schema.vo.TCubeView;
import nc.tb.schema.vo.TDataCell;
import nc.tb.schema.vo.TDimDef;
import nc.tb.schema.vo.TDimMember;
import nc.tb.schema.vo.TDimView;
import nc.tb.schema.vo.TDimViewrelation;
import nc.tb.schema.vo.TFormula;
import nc.tb.schema.vo.TFormulaGroup;
import nc.tb.schema.vo.TPlan;
import nc.tb.schema.vo.TReport;
import nc.tb.schema.vo.TSdTaskVO;
import nc.tb.schema.vo.TViewCell;
import nc.vo.pub.CircularlyAccessibleValueObject;
import nc.vo.pub.ValueObject;
import com.thoughtworks.xstream.XStream;
import com.ufsoft.report.IufoFormat;
import com.ufsoft.table.Cell;
import com.ufsoft.table.CellsModel;
import com.ufsoft.table.CombinedAreaModel;
import com.ufsoft.table.SelectedArea;
import com.ufsoft.table.header.Header;
import com.ufsoft.table.header.HeaderModel;
import com.ufsoft.table.print.PrintSet;

public class XStreamConfig {

	public static XStream getXStream(Class objectClass) {
		XStream xs = new XStream();
		xs.alias("AppSchema", AppSchema.class);
		xs.alias("SchemaInfo", SchemaInfo.class);
		xs.alias("Dimension", Dimension.class);
		xs.alias("TDimMember", TDimMember.class);
		xs.alias("TDimDef", TDimDef.class);
		xs.alias("Cube", Cube.class);
		xs.alias("TDimView", TDimView.class);
		xs.alias("TCubeView", TCubeView.class);
		xs.alias("TDimViewrelation", TDimViewrelation.class);
		xs.alias("TFormulaGroup", TFormulaGroup.class);
		xs.alias("TFormula", TFormula.class);
		xs.alias("TDataCell", TDataCell.class);
		xs.alias("TReport", TReport.class);
		xs.alias("TViewCell", TViewCell.class);
		//
		xs.alias("CellsModel", CellsModel.class);
		xs.alias("TCellsModel", TCellsModel.class);
		xs.alias("SelectedArea", SelectedArea.class);
		xs.alias("HeaderModel", HeaderModel.class);
		xs.alias("Header", Header.class);
		xs.alias("IufoFormat", IufoFormat.class);
		xs.alias("Cell", Cell.class);
		xs.alias("CombinedAreaModel", CombinedAreaModel.class);
		xs.alias("CellWrap", CellWrap.class);
		xs.alias("PrintSet", PrintSet.class);
		xs.alias("TPlan",TPlan.class);
		xs.alias("TSdTaskVO",TSdTaskVO.class);
		xs.alias("TCtrlformulaVO",TCtrlformulaVO.class);
		xs.alias("TCtrlschemeVO",TCtrlschemeVO.class);
		xs.alias("ConsolidationTemplate",ConsolidationTemplate.class);
		xs.alias("TCalendar",TCalendar.class);
		//
		 xs.omitField(CircularlyAccessibleValueObject.class, "status");
		 xs.omitField(ValueObject.class, "m_isDirty");
		 xs.omitField(TDimDef.class, "m_avaentities");
		 xs.omitField(TDimDef.class, "m_owner");
		 xs.omitField(TDimMember.class, "m_avaentities");
		 xs.omitField(TDimMember.class, "m_owner");
		 

	
		return xs;
	}
}
